#ifndef __POLY_RING__
#define __POLY_RING__
#include <vector>
#include <string>
using namespace std;
template<class T> vector<T> array_to_vector(const T* head, size_t n){
		vector<T> __res;
		for(size_t i=0; i<n; i++)
				__res.push_back(head[i]);
		return __res;
}

#define build_univararite_polynomial_ring(name, var, ch) class \
name {\
	public:\
	virtual ~name()=0;\
	static const vector<string> vars;\
	static int characteristic;\
};\
const vector<string> name::vars(1,var);\
int name::characteristic = ch;

#define build_bivariate_polynomial_ring(name, var1, var2, ch) class \
name {\
	public:\
	virtual ~name()=0;\
	static const vector<string> vars;\
	static int characteristic;\
};\
string __myvars[]={var1, var2};\
const vector<string> name::vars(array_to_vector(__myvars,2));\
int name::characteristic = ch;

#define build_trivariate_polynomial_ring(name, var1, var2,var3, ch) class \
name {\
	public:\
	virtual ~name()=0;\
	static const vector<string> vars;\
	static int characteristic;\
};\
string __myvars[]={var1, var2, var3};\
const vector<string> name::vars(array_to_vector(__myvars,3));\
int name::characteristic = ch;


#endif 
